﻿<%@ Page Language="C#" MasterPageFile="~/students/masterpage.Master" AutoEventWireup="true" CodeBehind="SProfile.aspx.cs" Inherits="ESCHOOL.students.WebForm2" Title="Student Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style3
        {
            width: 100%;
        }
    </style>
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <br />
    &nbsp;<table class="style3">
        <tr>
            <td style="text-align: center; font-weight: 700; text-decoration: underline">
                Profile</td>
        </tr>
    </table>
    <table class="style1">
        <tr>
            <td>
                <asp:Panel ID="Panel1" runat="server">
                    <table class="style1">
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td>
                                <asp:TextBox ID="tbstudentid" runat="server" Visible="False"></asp:TextBox>
                                <asp:TextBox ID="tbregistration" runat="server" Visible="False"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Panel ID="Panel2" runat="server">
                                    <table class="style1">
                                        <tr>
                                            <td>
                                                Enrollment No</td>
                                            <td>
                                                <asp:TextBox ID="tbenroll" runat="server" ReadOnly="True"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Roll No</td>
                                            <td>
                                                <asp:TextBox ID="tbroll" runat="server" ReadOnly="True"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Class</td>
                                            <td>
                                                <asp:DropDownList ID="ddclass" runat="server" 
                                                    onselectedindexchanged="ddclass_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Year Of Studing</td>
                                            <td>
                                                <asp:DropDownList ID="ddyearstuding" runat="server" 
                                                    onselectedindexchanged="ddyearstuding_SelectedIndexChanged">
                                                    <asp:ListItem>2000</asp:ListItem>
                                                    <asp:ListItem>2001</asp:ListItem>
                                                    <asp:ListItem>2002</asp:ListItem>
                                                    <asp:ListItem>2003</asp:ListItem>
                                                    <asp:ListItem>2004</asp:ListItem>
                                                    <asp:ListItem>2005</asp:ListItem>
                                                    <asp:ListItem>2006</asp:ListItem>
                                                    <asp:ListItem>2007</asp:ListItem>
                                                    <asp:ListItem>2008</asp:ListItem>
                                                    <asp:ListItem>2009</asp:ListItem>
                                                    <asp:ListItem>2010</asp:ListItem>
                                                    <asp:ListItem>2011</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                User Type</td>
                                            <td>
                                                <asp:DropDownList ID="ddusertype" runat="server" 
                                                    onselectedindexchanged="ddusertype_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td>
                                <asp:Image ID="Image2" runat="server" />
                            </td>
                           
                        </tr>
                        <tr>
                            <td>
                                Student Name</td>
                            <td>
                                <asp:TextBox ID="tbstudname" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                    ControlToValidate="tbstudname" ErrorMessage="Plz enter full name"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Date Of Birth</td>
                            <td>
                                <asp:DropDownList ID="dddate" runat="server" 
                                    onselectedindexchanged="dddate_SelectedIndexChanged">
                                </asp:DropDownList>
                                <asp:DropDownList ID="ddmonth" runat="server" 
                                    onselectedindexchanged="ddmonth_SelectedIndexChanged">
                                    <asp:ListItem Value="1">Jan</asp:ListItem>
                                    <asp:ListItem Value="2">Feb</asp:ListItem>
                                    <asp:ListItem Value="3">Mar</asp:ListItem>
                                    <asp:ListItem Value="4">Apr</asp:ListItem>
                                    <asp:ListItem Value="5">May</asp:ListItem>
                                    <asp:ListItem Value="6">Jun</asp:ListItem>
                                    <asp:ListItem Value="7">Jul</asp:ListItem>
                                    <asp:ListItem Value="8">Aug</asp:ListItem>
                                    <asp:ListItem Value="9">Sep</asp:ListItem>
                                    <asp:ListItem Value="10">Oct</asp:ListItem>
                                    <asp:ListItem Value="11">Nov</asp:ListItem>
                                    <asp:ListItem Value="12">Dec</asp:ListItem>
                                </asp:DropDownList>
                                <asp:DropDownList ID="ddyear" runat="server" 
                                    onselectedindexchanged="ddyear_SelectedIndexChanged">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Gender</td>
                            <td>
                                <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
                                    RepeatDirection="Horizontal">
                                    <asp:ListItem Value="f">Female</asp:ListItem>
                                    <asp:ListItem Value="m">Male</asp:ListItem>
                                </asp:RadioButtonList>
                                </td>
                        </tr>
                        <tr>
                            <td>
                                Photo</td>
                            <td>
                                <asp:FileUpload ID="FileUpload1" runat="server" />
                                <asp:TextBox ID="TextBox1" runat="server" Visible="False"></asp:TextBox>
                                <br />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Permanent Address</td>
                            <td>
                                <asp:TextBox ID="tbpaddess" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                    ControlToValidate="tbpaddess" ErrorMessage="Plz enter full address"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Residence No</td>
                            <td>
                                <asp:TextBox ID="tbrespno" runat="server"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                    ControlToValidate="tbrespno" ErrorMessage="Enter 10 digit no start with 0" 
                                    ValidationExpression="(0\d{9})"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Mobile No</td>
                            <td>
                                <asp:TextBox ID="tbmobile" runat="server"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                    ControlToValidate="tbmobile" ErrorMessage="Not valid,must be 10 digit no" 
                                    ValidationExpression="(\d{10})"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Student Email Id</td>
                            <td>
                                <asp:TextBox ID="tbstudmail" runat="server"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                                    ControlToValidate="tbstudmail" ErrorMessage="Ex(abc@gmail.com)" 
                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Security Question</td>
                            <td>
                                <asp:DropDownList ID="ddquestion" runat="server" 
                                    onselectedindexchanged="ddquestion_SelectedIndexChanged">
                                    <asp:ListItem>-</asp:ListItem>
                                    <asp:ListItem>Who is your best friend?</asp:ListItem>
                                    <asp:ListItem>Which is your birth place?</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Answer</td>
                            <td>
                                <asp:TextBox ID="tbanswer" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="labusername" runat="server" Text="Username" Visible="False"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbusername" runat="server" ReadOnly="True" Visible="False"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="labpassword" runat="server" Text="Password" Visible="False"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbpassword" runat="server" ReadOnly="True" Visible="False"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td>
                                <asp:Button ID="btnupdate" runat="server" onclick="btnupdate_Click" 
                                    Text="Update" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
    </table>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:DetailsView 
        ID="DetailsView1" runat="server" AutoGenerateRows="False" Height="50px" 
         
        style="text-align: left" Width="440px" onmodechanging="DetailsView1_ModeChanging" 
       >
        <Fields>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" Height="94px" 
                        ImageUrl='<%# "~/admin/student/"+Eval("photo") %>' style="text-align: right" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="enrollment_no" HeaderText="Enrollment No" />
            <asp:BoundField DataField="roll_no" HeaderText="Roll No" />
            <asp:BoundField DataField="class_name" HeaderText="Class" />
            <asp:BoundField DataField="student_name" HeaderText="Name" />
            <asp:BoundField DataField="father_name" HeaderText="Father Name" />
            <asp:TemplateField HeaderText="Date of Birth">
            <ItemTemplate><%#Eval("date_of_birth","{0:D}") %></ItemTemplate></asp:TemplateField>
            <asp:BoundField DataField="permanent_address" HeaderText="Address" />
            <asp:BoundField DataField="residence_pno" HeaderText="Phone No" />
            <asp:BoundField DataField="mobile_no" HeaderText="Mobile No" />
            <asp:BoundField DataField="student_emailid" HeaderText="Emailid" />
            <asp:BoundField DataField="username" HeaderText="Username" />
            <asp:BoundField DataField="password" HeaderText="Password" />
            <asp:BoundField DataField="security_question" HeaderText="Security Question" />
            <asp:BoundField DataField="answer" HeaderText="Answer" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Button ID="btnedit" runat="server" 
                        CommandArgument='<%# Eval("student_id") %>' CommandName="Edit" 
                        oncommand="btnedit_Command" Text="Edit" CausesValidation="False" />
                </ItemTemplate>
            </asp:TemplateField>
        </Fields>
    </asp:DetailsView>
    <br />
    &nbsp;
    </asp:Content>
